﻿using DAL;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace StudentManagerPro.Handlers
{
    /// <summary>
    /// QueryClassHandler 的摘要说明
    /// </summary>
    public class QueryClassHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json";
            var classList = new StudentClassService().GetStudentClass();
            var strlist = JsonConvert.SerializeObject(classList);
            context.Response.Write(strlist);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}